package org.eiahe.hr.salary.domain.bo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.ehe.common.core.validate.AddGroup;
import org.ehe.common.core.validate.EditGroup;
import org.ehe.common.core.xss.Xss;
import org.ehe.common.mybatis.core.domain.BaseEntity;
import org.eiahe.hr.salary.domain.SalaryAdjustmentApplication;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 调薪申请业务对象 hr_salary_adjustment_application
 *
 * @author zhangnn
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = SalaryAdjustmentApplication.class, reverseConvertGenerate = false)
public class SalaryAdjustmentApplicationBo extends BaseEntity {

    /**
     * 调薪申请ID
     */
    @NotNull(message = "调薪申请ID不能为空", groups = { EditGroup.class })
    private Long applicationId;

    /**
     * 租户ID
     */
    private String tenantId;

    /**
     * 工号
     */
    @NotBlank(message = "工号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String employeeNo;

    /**
     * 调薪原因
     */
    @NotBlank(message = "调薪原因不能为空", groups = { AddGroup.class, EditGroup.class })
    private String adjustmentReason;

    /**
     * 原薪资
     */
    @NotNull(message = "原薪资不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal originalSalary;

    /**
     * 新薪资
     */
    @NotNull(message = "新薪资不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal newSalary;

    /**
     * 生效时间
     */
    @NotNull(message = "生效时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date effectiveTime;

    /**
     * 审批状态(0待审批 1审批通过 2审批拒绝)
     */
    private String approvalStatus;

    /**
     * 审批人
     */
    private String approver;

    /**
     * 审批时间
     */
    private Date approvalTime;

    /**
     * 调薪依据(如绩效评分表ID)
     */
    private String adjustmentBasis;

    /**
     * 备注
     */
    @Xss(message = "备注不能包含脚本字符")
    private String remark;
}